<template>
  <div class="app-aside bg-light dker b-r">
    <div class="aside-wrap">
      <div class="navi-wrap">
        <nav id="admin-header-nav" class="navi">
          <el-menu mode="vertical" :default-active="defaultActive" :router="openRouter" class="el-menu-vertical-demo">
            <el-menu-item-group title="Components">
              <el-submenu :index="item.id" v-for="item in items">
                <template slot="title"><i :class="'glyphicon '+item.icoSmall"></i>{{item.backName}}</template>
                <el-menu-item :index="son.backUrl" v-for="son in item.son">{{son.backName}}</el-menu-item>
              </el-submenu>
            </el-menu-item-group>
          </el-menu>
        </nav>
      </div>
    </div>
  </div>
</template>
<script>

  import {SERVICE_URLS} from '../../config/service.url'
  import Vue from 'vue'
  import wurl from 'wurl'
  export default{
    name: "nav-index",
    data: function () {
      return {
        openRouter: true,
      }
    },
    computed: {
      defaultActive: function () {
        return this.$store.state.navDefaultActive;
      },
      items(){
        return this.$store.state['columnItems'];
      }
    }
//    mounted(){
//      $(".navi-wrap").scrollUnique();
//    }
  }
</script>
<style>
  #admin-header-nav .el-menu {
    background: none;
  }

  #admin-header-nav .el-submenu__title {
    font-weight: 700;
    color: #363f44;
    height: 40px;
    line-height: 40px;
  }

  #admin-header-nav .el-menu-item {
    height: 40px;
    line-height: 40px;
    color: #363f44;
  }

  #admin-header-nav .el-submenu .el-menu-item {
    height: 40px;
    line-height: 40px;
    color: #363f44;
  }

  #admin-header-nav .el-submenu .el-menu {
    background: #e4eaec;
  }

  #admin-header-nav .el-menu-item.is-active {
    background: #f6f8f8;
    color: #363f44;
  }

  #admin-header-nav .el-menu-item-group__title {
    line-height: 35px;
    height: 35px;
    color: #98a6ad;
    font-size: 12px;
    padding-top: 0;
  }

  #admin-header-nav .el-submenu__title:hover {
    background: #f6f8f8;
  }

  #admin-header-nav .el-menu-item:hover {
    background: #f6f8f8;
  }

  #admin-header-nav .el-submenu .el-menu-item:hover {
    background: #f6f8f8;
  }

  #admin-header-nav .el-submenu__title .glyphicon {
    vertical-align: baseline;
    margin-right: 10px;
  }
</style>
